import request from '@/utils/request'


// 轮播接口
export function getBannerPort() {
  return request({
    url: '/banner?',
    method: 'get',
    headers: {
      DeviceType: 'H5'
    }
  })
}
// 首页数据
export function getListDataPort() {
  return request({
    url: '/recommend/appIndex',
    method: 'GET'
  })
}
// 获取详情页讲师信息
export function getUserPort(id) {
  return request({
    url: `/teacher/${id}`,
    method: 'GET'
  })
}

// 获取详情页讲师信息
export function getUserInfoPort(id) {
  return request({
    url: `/teacher/info/${id}`,
    method: 'GET'
  })
}

// 获取详情页讲师信息
export function getCoursePort(limit, page, teacher_id) {
  return request({
    url: '/teacher/mainCourse',
    method: 'POST',
    data: {
      limit,
      page,
      teacher_id
    }
  })
}
// 关注
export function getAttenPort(iid){
  return request({
    url:`/teacher/collect/${iid}?`,
    method:'get',
  })
}
// 关注的
export function getAttensPort(page,limit,type=2){
  return request({
    url:`/collect?page=${page}&limit=${limit}&type=${type}&`,
    method:'get',
  })
}